<{include file='public/meta' /}

<title>添加管理员 - 管理员管理 - H-ui.admin v3.0</title>
</head>
<body>

<article class="cl pd-20">
	<form action="" method="post" class="form form-horizontal" id="form-admin-add">
		<table class="table table-border table-bordered table-bg">
			<p>
				年份：<span id='yy'>{$data.yy}</span>
				&nbsp;&nbsp;&nbsp;&nbsp;
				月份：<span id='mm'>{$data.mm}</span>
			</p>
			
			<thead>
				<tr>
					<th scope="col" colspan="9">信息列表</th>
				</tr>
					
				<tr class="text-c">
					<th width="100">年度：</th>
					<th width="100">月份：</th>
					<th width="100">周度：</th>
					<th width="100">自然日</th>
					<th width="100">累计自然日</th>
					<th width="100">工作日</th>
					<th width="100">累计工作日</th>
				</tr>
				
			</thead>
			<tbody>
			
			{for start="1" end="$data.ww+1"}
				<tr class="text-c">
					<td>{$data.yy}</td>
					<td>{$data.mm}</td>
					<td>{$i}</td>
					<td><input type="text" name = "day_{$i}"   ></td>
					<td><input type="text" name = "dayacc_{$i}"></td>
					<td><input type="text" name = "wkday_{$i}"></td>
					<td><input type="text" name = "wkdayacc_{$i}"></td>
				</tr>
			{/for}
		</table>
		
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-10 col-sm-offset-10">
				<input class="btn btn-primary radius" type="button" value="&nbsp;&nbsp;提交&nbsp;&nbsp;" id="submit">
				<font id = "mes" style="position:relative; left: 50px;"></font>
			</div>
		</div>
	</form>


</article>

{include file="public/footer" /}

<script>
	
	$(function(){

        $("#submit").click(function(){
        	// alert($('#ww').val());
            $.ajax({
				type: "POST",
				url: 'http://localhost/myphp8/public/index/datee/addDatee'+'/yy/'+$('#yy').text()+'/mm/'+$('#mm').text(),
				data: $("#form-admin-add").serialize(),
				dataType: "json",
				success: function(data){
					alert(data.message);
					
					layer.close(layer.index);
                    parent.location.reload(); // 父页面刷新
				}
			});

		});

	})
</script>


</body>
</html>